/**
 * @section LICENSE
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details at
 * http://www.gnu.org/copyleft/gpl.html
 */

#ifndef FREEBLOCK_H
#define FREEBLOCK_H

#include <Point.h>

namespace BlockDropper
{

class FreeBlock
{
public:
	FreeBlock();
	void drop();
	bool getConstituentBlock(const unsigned x, const unsigned y) const;
	void moveLeft();
	void moveRight();
	const Point<unsigned short> & position() const;
	void turnAntiClockwise();
	void turnClockwise();
private:
	Point<unsigned short> memberPosition;
	bool constituentBlocks[2][2] = {{true, false}, {false, true}};
};

} // end namespace BlockDropper

#endif // FREEBLOCK_H

